#include <iostream>
using namespace std;
template<typename T>
T max(T *a,int n)

//你的代码将嵌在这里
{
    T m=a[0];
    for(int i=1;i<n;i++)
    {
        if(m<a[i])
        {
            m=a[i];
        }
    }
    return m;
}



int main()
{
    int ai[6]={10,21,-31,13,6,0};
    char ac[4]={'a','U','*','8'};
    float af[5]={1.2F,6.32F,-6.2F,0.2F,92.3F};
    double ad[3]={3.2,95.123,-3.12};
    long al[4]={32L,21L,909L,-62L};
    cout<<max(ai,6)<<endl;
    cout<<max(ac,4)<<endl;
    cout<<max(af,5)<<endl;
    cout<<max(ad,3)<<endl;
    cout<<max(al,4)<<endl;
    return 0;
}